fix: correct the way that requested pro services are matched with enabled pro services#581
Open
linostar wants to merge 106 commits intocanonical:feature/pro-sourcesfrom
Open
fix: correct the way that requested pro services are matched with enabled pro services#581linostar wants to merge 106 commits intocanonical:feature/pro-sourcesfrom
linostar wants to merge 106 commits intocanonical:feature/pro-sourcesfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/pro-sources #581 +/- ##
======================================================
Coverage ? 90.49%
======================================================
Files ? 65
Lines ? 3787
Branches ? 414
======================================================
Hits ? 3427
Misses ? 289
Partials ? 71 ☔ View full report in Codecov by Sentry. |
This is a fix for canonical/charmcraft#1874 The spec (ST105) allows <list-of-arch> | <arch> in both build-on and build-for on all craft apps. This change makes the Platform model accept a string value, but doesn't specify that in the schema. This means text editors using the schema will still suggest converting the build-on and build-for values to lists.
This fix addresses cases like, for example, a project that only builds on `amd64` being built on `riscv64`. Previously the call to run_managed() would loop over the (empty) build plan and then finish "successfully". This new version will raise an EmptyBuildPlanError indicating to the user that they should check the project's 'platforms' declaration and the command-line parameters. Fixes canonical#225
`--shell` and `--shell-after` are implemented for a) consistency with the other lifecycle commands, and b) because it makes sense to want to inspect the build environment at packing time, considering that there are packing-related steps, like writing the metadata file, that the users don't have a way to inspect otherwise (short of examining the final artefact). `--debug` is improved to actually shell into the build environment when the packing itself failed, as opposed to the previous behavior of only debugging failures that happen during the lifecycle steps. Fixes canonical#430 --------- Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
Adds a configuration service that can be used to get application configuration. CRAFT_* environment variables are only used if the config item is known to craft-application (not for app-specific config). Co-authored-by: Dariusz Duda <dariusz.duda@canonical.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…al#449) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* docs: add changelog for 4.2.0 * docs: review changelog 4.2.0 * Update docs/reference/changelog.rst Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com> * move command entry to subheader --------- Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com>
This allows applications to override the inner run logic, with the end goal of capturing application specific exceptions and raise appropriate ones for Craft Application to handle. Without the logic split, overriding run to capture exceptions is virtually impossible as the run method holds a generic Exception handler. Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
Previously, if a value was in the passed Namespace, it would return that. The correct behaviour however is to check the environment for the value and return that instead.
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This lets commands be able to always rely on `self.config` existing, even when running `fill_parser()` for help output. Fixes canonical#530
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com> Co-authored-by: Dariusz Duda <dariusz.duda@canonical.com>
Add some steps under the "Configuring fetch-service integration :: " progress, to give some feedback that things are happening without all of the noisy output from Apt. Fixes canonical#536
Craft Application will only add default commands in a group if the application doesn't define the command. The order of command groups is now preserved. Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Version 2.10.1 fixes the issue where the app greeting is shown twice when running in managed mode, which happened because the Emitter was initialized in "verbose" and then the Dispatcher set it to verbose again when parsing the command line. Fixes canonical#551
Signed-off-by: Dariusz Duda <dariusz.duda@canonical.com>
Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
Both mypy and pyright complain that the "field.default_factory()" call has too few arguments, even though its type is typing.Callable[[], Any]. It should be fixed soon, and in the meantime we can ignore the spurious error. Ref: pydantic/pydantic#10945
* Check that the provided "--name" is valid according to the standard name regex. * If the user doesn't provide a "--name", *and* the project directory is *not* a valid project name, default to "my-project".
The issue with redirecting the fetch-service's output to a file via bash is this: as a strict snap, the fetch-service cannot inherit the file descriptors from the bash process if said process is spawned by a classic snap. This is the case when the integration is controlled by a snapped craft tool: ``` +----------------------------+ +-------------+ |(snapped) craft-tool -> bash| -----> |fetch-service| +----------------------------+ +-------------+ ``` The solution here is to pass the path to the logfile to the fetch-service itself through a new, recently implemented command-line option. We also update the logpath to use tmp, and print the path when emitting the warning about the integration being experimental. Refs: - https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1849753 Fixes canonical#550
61f8604 to
e6b1b47
Compare
added 2 commits
December 4, 2024 13:06
d46fef8 to
2130235
Compare
2130235 to
2d34504
Compare
lengau
reviewed
Dec 4, 2024
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| # Generate release notes on the new GH release | ||
| generate_release_notes: true |
Collaborator
There was a problem hiding this comment.
This looks like it comes from our changes to main, right? If so, could you separately merge main to this feature branch so the PR is cleaner?
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tox?What's done in this PR: